#!/usr/bin/python
# -*- coding: utf-8 -*-

'''
Introduction to Programming in Java - An Interdisciplinary Approach

All book programs ported to Python by
Scott C. King (revisionx at {gee}ma1l <dot> c0m).

All program examples pass Pylint with a perfect 10.00 score.
Pylint:  http://www.pylint.org/


Exercise 1.2.15 - Triangle inequality theorem

Syntax:
python triangle_inequality.py 12 8 10


Notes:
int(sys.argv[1]) == Integer.parseInt(args[0])

sys is a required import here in order to use command line arguments.
https://docs.python.org/2/tutorial/stdlib.html

'''

import sys


def main():
    ''' Take 3 inputs, compute if valid lengths of triangle '''

    side1 = int(sys.argv[1])
    side2 = int(sys.argv[2])
    side3 = int(sys.argv[3])

    print "Side 1: {}, Side 2: {}, Side 3: {}".format(side1, side2, side3)
    print (side1 + side2 > side3) and (side1 + side3 > side2) and \
          (side2 + side3 > side1)

if __name__ == '__main__':
    main()
